package com.example.armmvvm.ui.constraint.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import com.example.arm.base.BaseFragment
import com.example.armmvvm.databinding.FragmentSideBySideNestedScrollBinding
import com.example.armmvvm.ui.constraint.adapter.SimpleAdapter
import com.example.armmvvm.ui.scrollview.NestedScrollBehaviorHelper

/**
 *
 * 包名：com.example.armmvvm.ui.constraint.fragment
 * 文件描述：
 * 创建人：yanghaozhang
 * 创建时间：2023/1/5 9:36
 * 修改人：
 * 修改时间：
 * 修改备注：
 * @Version:1.0
 */
class SideBySideNestedScrollFragment : BaseFragment<FragmentSideBySideNestedScrollBinding>() {
    override fun initView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): FragmentSideBySideNestedScrollBinding {
        return FragmentSideBySideNestedScrollBinding.inflate(inflater)
    }

    override fun initData(savedInstanceState: Bundle?) {
        binding?.recyclerView1?.adapter = SimpleAdapter.getAdapter()
        binding?.recyclerView2?.adapter = SimpleAdapter.getAdapter()
        binding?.recyclerView3?.adapter = SimpleAdapter.getAdapter(103)

        binding?.recyclerView2?.let {
            NestedScrollBehaviorHelper.addToNoNestedList(it)
        }
        binding?.recyclerView3?.let {
            NestedScrollBehaviorHelper.addToBottomList(it)
        }
    }
}